/***************************************************************************
 创建者: 华磊
 开始时间: 2018.12.13
 copyright: (C) 华友高科
 修改说明: (每次有修改就添加一条，带有 修改人，修改时间，修改描述)
 example (1) hualei 2020.5.8 类的具体实现代码编写

 ***************************************************************************
 *  @file x.h
 *  功能:
 *
 *                                                                         *
 ***************************************************************************/
#ifndef LASERDRIVERSICKLMS_H
#define LASERDRIVERSICKLMS_H
#include "laserdriverabstract.h"
#include <string>
#include <ros/ros.h>
#include "globalDefine.h"
#include <qdebug.h>
#include "sensor_msgs/LaserScan.h"


class LMS1xx;

class LaserDriverSickLms : public LaserDriverAbstract
{
public:
    LaserDriverSickLms(LaserDriverConfig configIn);
    ~LaserDriverSickLms();
public:
    int initialDriver(LaserDriverConfig configIn);
    int publishLaserDataLoopOnce();
    int shutDownDriver();
    bool isDriverStatusOk();
private:
    int loopOnce();
    void* threadRun(void *);
    static void* threadTask( void* classPtr );
    void createThread();
private:
    bool isShutDown;
    pthread_t threadId;
private:
    LMS1xx *laser;
    sensor_msgs::LaserScan scan_msg;
    ros::Publisher* scan_pub;
};

#endif // LASERDRIVERSICKLMS_H
